﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GetFreeDiamond.aspx.cs" Inherits="Yule8xWechat.Promotion.GetFreeDiamond" %>

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>免费领取钻石</title>
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/comm.css" />
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/icon.css" />
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/my.css" />
    <link rel="stylesheet" type="text/css" href="/Skin/Theme/Css/agent.css" />
    <script src="/Skin/Theme/Js/flexible_css.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Skin/Theme/Js/flexible.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Skin/Theme/Js/jquery_2.1.3.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Skin/Plugins/DialogLib/layer-v3.0.1/layer.js" type="text/javascript"></script>
</head>
<body>
    <div class="content">

        <!--赠送对象信息-->
        <form method="post" action="GetFreeDiamond.aspx?user_id=<%=user_id %>">
            <div class="choosegame">
                <div class="choosetext">请选择游戏</div>
                <div class="gameicon">
                    <span class="iconp">
                        <img id="bozhongicon" src="/Skin/Theme/Images/my/btn_05.png"></span>
                    <span class="iconp">
                        <img id="wanghuicon" src="/Skin/Theme/Images/my/btngray_03.png"></span>
                </div>
            </div>

            <!--隐藏文本域-->
            <input type="hidden" name="game_id" id="game_id" value="<%=wxUser.game_id_bozhong %>" data-bozhongid="<%=wxUser.game_id_bozhong %>" data-wanghuid="<%=wxUser.game_id_wanghu %>" />
            <input type="hidden" name="game_mact_id" id="game_mact_id" value="1" />
            <div class="regagenttip">
                <div class="tiptext">钻石将直接转入<a class="t-r">您的游戏ID（必须有ID）</a></div>
                <div class="tiptext"><a class="t-r">每个用户仅有一次免费领取的机会</a></div>
                <div class="tiptext"><a class="t-r">选择八星娱乐 则将获得3张房卡 选择八星游戏则将获得9颗金豆</a></div>
            </div>

            <!--赠送按钮-->
            <div class="regbutton">
                <span class="regbtn">
                    <button type="submit">免费领取</button></span>
            </div>
            <input type="hidden" name="action" value="submit" />
        </form>
    </div>
    <script type="text/javascript">
        if ($('#game_id').data('bozhongid') < 1 && $('#game_id').data('wanghuid') > 0) {
            $('#bozhongicon').attr('src', '/Skin/Theme/Images/my/btngray_05.png');
            $('#wanghuicon').attr('src', '/Skin/Theme/Images/my/btn_03.png');
            $('#game_mact_id').val(2);
            $('#game_id').val($('#game_id').data('wanghuid'));

        }
        $('#bozhongicon').click(function () {
            if ($('#game_id').data('bozhongid') < 1) {
                layer.msg('请先下载八星娱乐并体验一次游戏!')
                return false;
            }
            $(this).attr('src', '/Skin/Theme/Images/my/btn_05.png');
            $('#wanghuicon').attr('src', '/Skin/Theme/Images/my/btngray_03.png');
            $('#game_mact_id').val(1);
            $('#game_id').val($('#game_id').data('bozhongid'));
        })

        $('#wanghuicon').click(function () {
            if ($('#game_id').data('wanghuid') < 1) {
                layer.msg('请先下载八星游戏并体验一次游戏!')
                return false;
            }
            $('#bozhongicon').attr('src', '/Skin/Theme/Images/my/btngray_05.png');
            $(this).attr('src', '/Skin/Theme/Images/my/btn_03.png');
            $('#game_mact_id').val(2);
            $('#game_id').val($('#game_id').data('wanghuid'));
        })
    </script>
</body>
</html>
